import _ from 'lodash';
import printMe from "./print"

function component() {
    const element = document.createElement('div');
    const btn = document.createElement('button');

    // lodash，模块化的引入使用
    element.innerHTML = _.join(['Hello', 'webpack'], ' ');

    btn.innerHTML = '点击我看看控制台输出!';
    btn.onclick = printMe;
  
    element.appendChild(btn);
    return element;
}

document.body.appendChild(component());